import request from '@/utils/request'

// 查询（查询实体）专家库信息列表
export function listExpert(query) {
  return request({
    url: '/web/sheet/queryList',
    method: 'get',
    params: query
  })
}
// 获取专家库信息详细信息
export function getExpert(expertId) {
  return request({
    url: '/web/sheet/' + expertId,
    method: 'get'
  })
}
// 新增专家库信息
export function addExpert(data) {
  return request({
    url: '/web/sheet/addSave',
    method: 'post',
    data: data
  })
}
// 修改专家库信息
export function updateExpert(data) {
  return request({
    url: '/web/sheet/editSave',
    method: 'put',
    data: data
  })
}
// 删除专家库信息
export function delExpert(expertId) {
  return request({
    url: '/web/sheet/' + expertId,
    method: 'delete'
  })
}

// 新增技术职称
export function addTechnical(data) {
  return request({
    url: '/system/title/addSave',
    method: 'post',
    data: data
  })
}
// 修改技术职称
export function updateTechnical(data) {
  return request({
    url: '/system/title/editSave',
    method: 'put',
    data: data
  })
}
// 删除技术职称
export function delTechnical(technicalId) {
  return request({
    url: '/system/title/' + technicalId,
    method: 'delete'
  })
}

// 新增职业资格
export function addProfession(data) {
  return request({
    url: '/system/qualification/addSave',
    method: 'post',
    data: data
  })
}
// 修改职业资格
export function updateProfession(data) {
  return request({
    url: '/system/qualification/editSave',
    method: 'put',
    data: data
  })
}
// 删除职业资格
export function delProfession(professionalId) {
  return request({
    url: '/system/qualification/' + professionalId,
    method: 'delete'
  })
}
//获取专家登录账号专家id
export function getExpertId(data) {
  return request({
    url: "/web/sheet/getInfoByUserId",
    method: "get",
    params: data,
  });
}